package fr.pascal.client.java;

public class Serpentin {

	public static void main(String[] args) {

		int lignes, colonnes;
		
		lignes = 5;
		colonnes = 4;

		int[][] t = new int[lignes][colonnes];
		
//		int value = 1;

		for (int i = 0; i < lignes; i++) {
			for (int j = 0; j < colonnes; j++) {
				
				
				if (i % 2 == 0) {
					t[i][j] = j + 1;
				} else {
					t[i][j] = -9;
				}
				
				
//				t[i][j] = value;
//				value++;
			}
		}
		afficher(t);
	}

	private static void afficher(int[][] t) {
		String ch  = "";
		for (int i = 0; i < t.length; i++) {
			for (int j = 0; j < t[i].length; j++) {
				if (j < t[i].length - 1) {
					ch += t[i][j] + " - ";
				} else {
					ch += t[i][j] + "\n";
				}
			}
		}
		System.out.println(ch);
	}
}
